package com.jianneng.jdg.model.homeactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.com.jianneng.jdg.R;

public class PrefactActivity extends BaseActivity {
private LinearLayout mPrefactBack;
private TextView mPrefactCommit;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_prefact);
		init();
		callback();
		
	}
	private void callback() {
		mPrefactBack.setOnClickListener(new MyOnClickListener());
		mPrefactCommit.setOnClickListener(new MyOnClickListener());
	}
	public class MyOnClickListener implements OnClickListener{

		@Override
		public void onClick(View v){
			switch (v.getId()) {
			case R.id.prefact_back:
				finish();
				break;
			case R.id.prefact_commit :
				Intent intent = new Intent(PrefactActivity.this, MainActivity.class);
				intent.putExtra("id","4");
				intent.putExtra("success", "true");
				startActivity(intent);
				break;
			default:
				break;
			}
			
		}
		
	}
	private void init() {
		mPrefactBack = (LinearLayout) findViewById(R.id.prefact_back);
		mPrefactCommit = (TextView) findViewById(R.id.prefact_commit);
	}
	
	
}
